﻿using System;
using System.Windows;
using BattlelogMobile.Client.Converter;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace BattlelogMobile.Test.Client.Converter
{
    [TestClass()]
    public class ImageUrlConverterTest
    {
        private readonly ImageUrlConverter _converter = new ImageUrlConverter();

        [TestMethod()]
        public void ConvertTest()
        {
            string expected = string.Empty;
            object actual = _converter.Convert("parameter not specified", null, null, null);
            Assert.AreEqual(expected, actual);

            expected = "http://battlelog-cdn.battlefield.com/public/profile/bf3/stats/ranks/small/r01.png?v=3173239";
            actual = _converter.Convert("01", null, "Rank", null);
            Assert.AreEqual(expected, actual);
        }

        //[TestMethod()]
        //[ExpectedException(typeof(FormatException))]
        //public void ConvertExceptionTest()
        //{
        //    object actual = _converter.Convert("not a number", null, null, null);
        //}
    }
}